package controller.student.score;

import java.io.IOException;
import java.sql.SQLException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import view.DataList;

import dao.Score;

@WebServlet("/student/score/index")
public class index extends controller.student.Base {
    private static final long serialVersionUID = 1L;

    public index() {
        super();
    }

    protected void doGet(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
        try {
            DataList<Score.Data> score = Score.selectByStuId((long) request.getAttribute("id"));
            view.displayMap("student/score.jsp", "list", score);
        } catch (SQLException e) {
            view.displayMap("error/error.jsp",
                    "title", "sql错误",
                    "msg", e.getMessage());
            e.printStackTrace();
        }
    }

    protected void doPost(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
        
    }
}
